#include "stm32f10x.h"

extern u16 readYear;
extern u8 readMonth;
extern u8 readDay;
extern u8 readHour;
extern u8 readMinute;
extern u8 readSecond;
extern u16 readWeek;
u8 const table_week[12] = {0,3,3,6,1,4,6,2,5,0,3,5};
const u8 mon_table[12] = {31,28,31,30,31,30,31,31,30,31,30,31};

void RTC_First_Config();
void RTC_Config();
u8 RTC_Set(u16 year,u8 mon,u8 day,u8 hour,u8 min,u8 sec);
u8 RTC_Get(void);
u16 RTC_Get_Week(u16 year,u8 month,u8 day);
u8 IsLeapYear(u16 year);